#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include<unistd.h>
#include<string.h>
int main()
{
  char buffer[128];
  int fp = open("bite",O_CREAT |  O_RDWR , 0666);
  //printf("%d\n",fp);
  const char *message = "I like Linux\n";
  write(fp,message,strlen(message));
  lseek(fp,0,SEEK_SET);
  size_t p_read = read(fp,buffer,sizeof(buffer)-1);
  buffer[p_read] = '\0';
  lseek(fp,0,SEEK_SET);
  write(1,buffer,p_read);
  close(fp);
  //printf("%s\n",buffer); 
  return 0;
}
